<template>
    <el-select :value="value" @change="valueChange" :placeholder="placeholder" :size="size">
        <el-option
            v-for="item in dateOptions"
            :key="item"
            :value="item">
        </el-option>
    </el-select>
</template>

<script>
export default {
    name: 'datePicker',
    props: {
        dateOptions: {
            type: Array,
            required: true,
        },
        value: String,
        placeholder: String,
        size: String,
    },
    model: {
        prop: 'value',
        event: 'change',
    },
    methods: {
        valueChange(val) {
            this.$emit('change', val);
        }
    }
}
</script>

<style>

</style>